(function() {
  var __hasProp = {}.hasOwnProperty,
    __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };

  this.ListingView = (function(_super) {

    __extends(ListingView, _super);

    function ListingView() {
      return ListingView.__super__.constructor.apply(this, arguments);
    }

    ListingView.prototype.initialize = function() {
      return ListingView.__super__.initialize.apply(this, arguments);
    };

    ListingView.prototype.pagination = function(event) {
      event.preventDefault();
      Loading.Start();
      this.model.set("Page", $(event.currentTarget).data("href"), {
        silent: true
      });
      return this.model.fetch();
    };

    ListingView.prototype.sort = function(event) {
      event.preventDefault();
      Loading.Start();
      this.model.set("Column", $(event.currentTarget).attr("column"), {
        silent: true
      });
      this.model.set("Direction", $(event.currentTarget).attr("direction"), {
        silent: true
      });
      return this.model.fetch();
    };

    ListingView.prototype.edit = function(event) {
      var url;
      event.preventDefault();
      url = $(event.currentTarget).closest("tr").attr("href");
      if (url != null) {
        Loading.Start();
        return this.Navigate(url, true);
      }
    };

    ListingView.prototype.changeSize = function(event) {
      event.preventDefault();
      Loading.Start();
      this.model.changeSize($(event.currentTarget).val());
      return this.model.fetch();
    };

    return ListingView;

  })(CustomView);

}).call(this);
